home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
vbmail
/
editor.frm
next >
Wrap
Text File
|
1995-09-06
|
5KB
|
209 lines
VERSION 2.00
Begin Form Editor
BackColor = &H00FFFF00&
Caption = "Mail Message Editor"
ClientHeight = 4425
ClientLeft = 945
ClientTop = 1350
ClientWidth = 7650
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Courier"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 5115
Icon = EDITOR.FRX:0000
Left = 885
LinkMode = 1 'Source
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4425
ScaleWidth = 7650
Top = 720
Width = 7770
Begin TextBox MsgText
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 2985
Left = 255
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Top = 1200
Width = 7200
End
Begin Frame Frame1
BackColor = &H00FFFF00&
Caption = "00/00/00, From: Al Stevens"
Height = 1155
Left = 255
TabIndex = 1
Top = 60
Width = 7200
Begin TextBox MsgSubj
Height = 330
Left = 705
TabIndex = 5
Top = 720
Width = 4755
End
Begin TextBox MsgTo
Height = 315
Left = 705
TabIndex = 4
Top = 345
Width = 3315
End
Begin Label Label4
BackColor = &H00FFFF00&
Caption = "Subj:"
Height = 255
Left = 150
TabIndex = 3
Top = 750
Width = 480
End
Begin Label Label3
BackColor = &H00FFFF00&
Caption = "To:"
Height = 255
Left = 150
TabIndex = 2
Top = 390
Width = 390
End
End
Begin Menu ID_FILE
Caption = "&File"
Begin Menu ID_OPEN
Caption = "&Open..."
Begin Menu ID_MAILBOX
Caption = "&Mailbox"
End
Begin Menu ID_MAILFILES
Caption = "&Mail &Files"
End
Begin Menu ID_ADDRBOOK
Caption = "&Address Book"
End
End
Begin Menu ID_SEND
Caption = "&Send"
Shortcut = ^S
End
Begin Menu ID_DELETE
Caption = "&Delete"
End
Begin Menu menuspace
Caption = "-"
End
Begin Menu ID_EXIT
Caption = "E&xit"
End
End
Begin Menu ID_EDIT
Caption = "&Edit"
Begin Menu ID_CUT
Caption = "Cu&t Shift+Del"
End
Begin Menu ID_COPY
Caption = "&Copy Ctrl+Ins"
End
Begin Menu ID_PASTE
Caption = "&Paste Shift+Ins"
End
Begin Menu ID_DEL
Caption = "&Delete Del"
End
End
End
DefInt A-Z
Sub Form_Load ()
MsgText.Text = ""
MsgTo.Text = ""
MsgSubj.Text = ""
Frame1.Caption = MakeDate(Date$) + ", From: " + MyUserName
End Sub
Sub Form_Unload (Cancel As Integer)
LoadMailBox "MSG"
End Sub
' ---- File/Open/Address Book Menu Command
Sub ID_ADDRBOOK_Click ()
AddrBook.Show MODAL
If AddrUserName <> "" Then
Editor.MsgTo.Text = AddrUserName
End If
End Sub
' ---- Edit/Copy Menu Command
Sub ID_COPY_Click ()
SendKeys "^{INSERT}"
End Sub
' ---- Edit/Cut Menu Command
Sub ID_CUT_Click ()
SendKeys "+{DEL}"
End Sub
' ---- Edit/Delete Menu Command
Sub ID_DEL_Click ()
SendKeys "{DEL}"
End Sub
' ---- File/Delete Menu Command
Sub ID_DELETE_Click ()
If MsgBox("Delete Message?", MB_YESNO, "E-Mail") = IDYES Then
MsgTo.Text = ""
MsgSubj.Text = ""
MsgText.Text = ""
MsgTo.SetFocus
End If
End Sub
' ---- Edit Menubar Selection
Sub ID_EDIT_Click ()
If MsgText.SelLength <> 0 Then
Blk = True
End If
ID_CUT.Enabled = Blk
ID_COPY.Enabled = Blk
ID_DEL.Enabled = Blk
ID_PASTE.Enabled = ClipBoard.GetFormat(CF_TEXT)
End Sub
' ---- File/Exit Menu Command
Sub ID_EXIT_Click ()
Unload Editor
End Sub
' ---- File/Open/Mailbox Menu Command
Sub ID_MAILBOX_Click ()
Editor.Hide
LoadMailBox "MSG"
End Sub
' ---- File/Open/Mail Files Menu Command
Sub ID_MAILFILES_Click ()
Editor.Hide
LoadMailBox "FIL"
End Sub
' ---- Edit/Paste Menu Command
Sub ID_PASTE_Click ()
SendKeys "+{INSERT}"
End Sub
' ---- File/Send Menu Command
Sub ID_SEND_Click ()
SendMail MsgTo.Text, MsgSubj.Text, MsgText.Text, True
End Sub